package com.etime.shycourse.wx.applets.pojo;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author wb
 * @since 2022-01-11
 */
@ApiModel(value = "Chapter对象", description = "章节实体")
public class Chapter implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "chapterid", type = IdType.AUTO)
    private Integer chapterid;

    private Integer courseid;

    private String chaptername;

    private String chaptersummary;

    @ApiModelProperty(value = "章的父id ==-1	   节的父id==章的id")
    private Integer chapterpid;

    private BigDecimal chapterprice;

    private BigDecimal chapteroriginprice;

    private BigDecimal chaptercoinprice;

    private BigDecimal chaptercoinmaxpoint;

    private Integer chapterbuynum;

    private Integer chapterstate;

    private Integer chapteruserid;

    private String chapterusertruename;

    private LocalDateTime chaptercreatetime;

    private LocalDateTime chapterupdatetime;

    @ApiModelProperty(value = "是否购买的判定值  1=已经全部购买 0=没有购买或购买一部分章节")
    @TableField(exist = false)
    private Integer whetherToBuy;
    @ApiModelProperty(value = "购买了就有 订单号(orderid)")
    @TableField(exist = false)
    private Integer orderid;

    public Integer getOrderid() {
        return orderid;
    }

    public void setOrderid(Integer orderid) {
        this.orderid = orderid;
    }

    //课时 数据库中没有
    @TableField(exist = false)
    private List<Lesson> lessons;

    public List<Lesson> getLessons() {
        return lessons;
    }

    public Integer getWhetherToBuy() {
        return whetherToBuy;
    }

    public void setWhetherToBuy(Integer whetherToBuy) {
        this.whetherToBuy = whetherToBuy;
    }

    public void setLessons(List<Lesson> lessons) {
        this.lessons = lessons;
    }

    public Integer getChapterid() {
        return chapterid;
    }

    public void setChapterid(Integer chapterid) {
        this.chapterid = chapterid;
    }

    public Integer getCourseid() {
        return courseid;
    }

    public void setCourseid(Integer courseid) {
        this.courseid = courseid;
    }

    public String getChaptername() {
        return chaptername;
    }

    public void setChaptername(String chaptername) {
        this.chaptername = chaptername;
    }

    public String getChaptersummary() {
        return chaptersummary;
    }

    public void setChaptersummary(String chaptersummary) {
        this.chaptersummary = chaptersummary;
    }

    public Integer getChapterpid() {
        return chapterpid;
    }

    public void setChapterpid(Integer chapterpid) {
        this.chapterpid = chapterpid;
    }

    public BigDecimal getChapterprice() {
        return chapterprice;
    }

    public void setChapterprice(BigDecimal chapterprice) {
        this.chapterprice = chapterprice;
    }

    public BigDecimal getChapteroriginprice() {
        return chapteroriginprice;
    }

    public void setChapteroriginprice(BigDecimal chapteroriginprice) {
        this.chapteroriginprice = chapteroriginprice;
    }

    public BigDecimal getChaptercoinprice() {
        return chaptercoinprice;
    }

    public void setChaptercoinprice(BigDecimal chaptercoinprice) {
        this.chaptercoinprice = chaptercoinprice;
    }

    public BigDecimal getChaptercoinmaxpoint() {
        return chaptercoinmaxpoint;
    }

    public void setChaptercoinmaxpoint(BigDecimal chaptercoinmaxpoint) {
        this.chaptercoinmaxpoint = chaptercoinmaxpoint;
    }

    public Integer getChapterbuynum() {
        return chapterbuynum;
    }

    public void setChapterbuynum(Integer chapterbuynum) {
        this.chapterbuynum = chapterbuynum;
    }

    public Integer getChapterstate() {
        return chapterstate;
    }

    public void setChapterstate(Integer chapterstate) {
        this.chapterstate = chapterstate;
    }

    public Integer getChapteruserid() {
        return chapteruserid;
    }

    public void setChapteruserid(Integer chapteruserid) {
        this.chapteruserid = chapteruserid;
    }

    public String getChapterusertruename() {
        return chapterusertruename;
    }

    public void setChapterusertruename(String chapterusertruename) {
        this.chapterusertruename = chapterusertruename;
    }

    public LocalDateTime getChaptercreatetime() {
        return chaptercreatetime;
    }

    public void setChaptercreatetime(LocalDateTime chaptercreatetime) {
        this.chaptercreatetime = chaptercreatetime;
    }

    public LocalDateTime getChapterupdatetime() {
        return chapterupdatetime;
    }

    public void setChapterupdatetime(LocalDateTime chapterupdatetime) {
        this.chapterupdatetime = chapterupdatetime;
    }

    @Override
    public String toString() {
        return "Chapter{" +
                "chapterid=" + chapterid +
                ", courseid=" + courseid +
                ", chaptername=" + chaptername +
                ", chaptersummary=" + chaptersummary +
                ", chapterpid=" + chapterpid +
                ", chapterprice=" + chapterprice +
                ", chapteroriginprice=" + chapteroriginprice +
                ", chaptercoinprice=" + chaptercoinprice +
                ", chaptercoinmaxpoint=" + chaptercoinmaxpoint +
                ", chapterbuynum=" + chapterbuynum +
                ", chapterstate=" + chapterstate +
                ", chapteruserid=" + chapteruserid +
                ", chapterusertruename=" + chapterusertruename +
                ", chaptercreatetime=" + chaptercreatetime +
                ", chapterupdatetime=" + chapterupdatetime +
                "}";
    }
}
